package com.cloud.poetry.system.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.cloud.poetry.base.entity.User;
import com.cloud.poetry.base.util.BaseUtil;
import com.cloud.poetry.system.mapper.UserMapper;
import com.cloud.poetry.system.service.UserService;
import org.springframework.stereotype.Service;

/**
 * @author mengxj
 */
@Service
public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements UserService {

    @Override
    public User currentUser(String loginName) {
        return this.getOne(new QueryWrapper<User>().lambda().eq(User::getLoginName, loginName));
    }
}
